package com.dx.logic;

import com.dx.chat.api.DemoService;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@Slf4j
@EnableDubbo
@SpringBootApplication
public class LogicApplication implements CommandLineRunner {
    @DubboReference
    private DemoService demoService;
    public static void main(String[] args) {
        //System.setProperty("dubbo.qos.port", "22232");
        SpringApplication.run(LogicApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        String result = demoService.sayHello("dubbo 测试调用成功");
    }
}